<!--
 * @Author: liuyonghu liuyonghu.com
 * @Date: 2025-03-11 11:11:29
 * @LastEditors: liuyonghu liuyonghu.com
 * @LastEditTime: 2025-03-11 14:15:01
 * @FilePath: /demos/location/index.html
-->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../utils/qs.js" type="application/javascript"></script>
</head>

<body>
    <script>

        function setUrlQuery(data) {
            const queryString = location.search.slice(1);
            const queryParams = Qs.parse(queryString);
            const keys = Object.keys(data);
            for (let index = 0; index < keys.length; index++) {
                const key = keys[index];
                queryParams[key] = data[key];
            };

            const search = Qs.stringify(queryParams);
            return search;
        }
        setTimeout(() => {
            location.search = setUrlQuery({ reload: 1 })
        }, 2000);
    </script>
</body>

</html>